import request from '@/router/axios'

export function getPage(query) {
  return request({
    url: '/weixin/wxdraft/page',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/weixin/wxdraft',
    method: 'post',
    data: obj
  })
}


export function getObj(id) {
  return request({
    url: '/weixin/wxdraft/' + id,
    method: 'get'
  })
}

export function delObj(query) {
  return request({
    url: '/weixin/wxdraft',
    method: 'delete',
    params: query
  })
}

export function putObj(obj) {
  return request({
    url: '/weixin/wxdraft',
    method: 'put',
    data: obj
  })
}

export function publish(appId, id) {
  return request({
    url: '/weixin/wxdraft/publish/'+appId+'/'+id,
    method: 'post'
  })
}
